package appreate.sixnations.quiz;

import android.app.Activity;
import android.content.SharedPreferences;
import android.graphics.Typeface;
import android.os.Bundle;
import android.widget.TextView;
import appreate.sixnations.quiz.R;

public class Record extends Activity {

	private TextView mPosition111;
	private TextView mPosition112;
	private TextView mPosition113;
	private TextView mPosition114;
	private TextView mPosition121;
	private TextView mPosition122;
	private TextView mPosition123;
	private TextView mPosition124;
	private TextView mPosition131;
	private TextView mPosition132;
	private TextView mPosition133;
	private TextView mPosition134;
	private TextView mPosition211;
	private TextView mPosition212;
	private TextView mPosition213;
	private TextView mPosition214;
	private TextView mPosition221;
	private TextView mPosition222;
	private TextView mPosition223;
	private TextView mPosition231;
	private TextView mPosition232;
	private TextView mPosition224;
	private TextView mPosition233;
	private TextView mPosition234;
	private TextView mPosition311;
	private TextView mPosition313;
	private TextView mPosition312;
	private TextView mPosition314;
	private TextView mPosition321;
	private TextView mPosition324;
	private TextView mPosition332;
	private TextView mPosition333;
	private TextView mPosition334;
	private TextView mPosition331;

	private TextView mPosition323;
	private TextView mPosition322;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.record);

		Typeface mTypeface = Typeface.createFromAsset(getAssets(), "fonts/wanted.ttf");

		((TextView) findViewById(R.id.title1)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.title11)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.title11)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.title12)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.title12)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.title13)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.title13)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.title14)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.title14)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.title2)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.title21)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.title21)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.title22)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.title22)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.title23)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.title23)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.title24)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.title24)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.title3)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.title31)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.title31)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.title32)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.title32)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.title33)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.title33)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.title34)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.title34)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.position_1_1_label)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.position_1_1_label)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.position_1_2_label)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.position_1_2_label)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.position_1_3_label)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.position_1_3_label)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.position_2_1_label)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.position_2_1_label)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.position_2_2_label)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.position_2_2_label)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.position_2_3_label)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.position_2_3_label)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.position_3_1_label)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.position_3_1_label)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.position_3_2_label)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.position_3_2_label)).setTextColor(getResources().getColor(R.color.green));
		((TextView) findViewById(R.id.position_3_3_label)).setTypeface(mTypeface);
		((TextView) findViewById(R.id.position_3_3_label)).setTextColor(getResources().getColor(R.color.green));

		mPosition111 = (TextView) findViewById(R.id.position_1_1_1);
		mPosition112 = (TextView) findViewById(R.id.position_1_1_2);
		mPosition113 = (TextView) findViewById(R.id.position_1_1_3);
		mPosition114 = (TextView) findViewById(R.id.position_1_1_4);
		mPosition121 = (TextView) findViewById(R.id.position_1_2_1);
		mPosition122 = (TextView) findViewById(R.id.position_1_2_2);
		mPosition123 = (TextView) findViewById(R.id.position_1_2_3);
		mPosition124 = (TextView) findViewById(R.id.position_1_2_4);
		mPosition131 = (TextView) findViewById(R.id.position_1_3_1);
		mPosition132 = (TextView) findViewById(R.id.position_1_3_2);
		mPosition133 = (TextView) findViewById(R.id.position_1_3_3);
		mPosition134 = (TextView) findViewById(R.id.position_1_3_4);
		mPosition211 = (TextView) findViewById(R.id.position_2_1_1);
		mPosition212 = (TextView) findViewById(R.id.position_2_1_2);
		mPosition213 = (TextView) findViewById(R.id.position_2_1_3);
		mPosition214 = (TextView) findViewById(R.id.position_2_1_4);
		mPosition221 = (TextView) findViewById(R.id.position_2_2_1);
		mPosition222 = (TextView) findViewById(R.id.position_2_2_2);
		mPosition223 = (TextView) findViewById(R.id.position_2_2_3);
		mPosition224 = (TextView) findViewById(R.id.position_2_2_4);
		mPosition231 = (TextView) findViewById(R.id.position_2_3_1);
		mPosition232 = (TextView) findViewById(R.id.position_2_3_2);
		mPosition233 = (TextView) findViewById(R.id.position_2_3_3);
		mPosition234 = (TextView) findViewById(R.id.position_2_3_4);
		mPosition311 = (TextView) findViewById(R.id.position_3_1_1);
		mPosition312 = (TextView) findViewById(R.id.position_3_1_2);
		mPosition313 = (TextView) findViewById(R.id.position_3_1_3);
		mPosition314 = (TextView) findViewById(R.id.position_3_1_4);
		mPosition321 = (TextView) findViewById(R.id.position_3_2_1);
		mPosition322 = (TextView) findViewById(R.id.position_3_2_2);
		mPosition323 = (TextView) findViewById(R.id.position_3_2_3);
		mPosition324 = (TextView) findViewById(R.id.position_3_2_4);
		mPosition331 = (TextView) findViewById(R.id.position_3_3_1);
		mPosition332 = (TextView) findViewById(R.id.position_3_3_2);
		mPosition333 = (TextView) findViewById(R.id.position_3_3_3);
		mPosition334 = (TextView) findViewById(R.id.position_3_3_4);
		mPosition111.setTypeface(mTypeface);
		mPosition112.setTypeface(mTypeface);
		mPosition113.setTypeface(mTypeface);
		mPosition114.setTypeface(mTypeface);
		mPosition121.setTypeface(mTypeface);
		mPosition122.setTypeface(mTypeface);
		mPosition123.setTypeface(mTypeface);
		mPosition124.setTypeface(mTypeface);
		mPosition131.setTypeface(mTypeface);
		mPosition132.setTypeface(mTypeface);
		mPosition133.setTypeface(mTypeface);
		mPosition134.setTypeface(mTypeface);
		mPosition211.setTypeface(mTypeface);
		mPosition212.setTypeface(mTypeface);
		mPosition213.setTypeface(mTypeface);
		mPosition214.setTypeface(mTypeface);
		mPosition221.setTypeface(mTypeface);
		mPosition222.setTypeface(mTypeface);
		mPosition223.setTypeface(mTypeface);
		mPosition224.setTypeface(mTypeface);
		mPosition231.setTypeface(mTypeface);
		mPosition232.setTypeface(mTypeface);
		mPosition233.setTypeface(mTypeface);
		mPosition234.setTypeface(mTypeface);
		mPosition311.setTypeface(mTypeface);
		mPosition312.setTypeface(mTypeface);
		mPosition313.setTypeface(mTypeface);
		mPosition314.setTypeface(mTypeface);
		mPosition321.setTypeface(mTypeface);
		mPosition322.setTypeface(mTypeface);
		mPosition323.setTypeface(mTypeface);
		mPosition324.setTypeface(mTypeface);
		mPosition331.setTypeface(mTypeface);
		mPosition332.setTypeface(mTypeface);
		mPosition333.setTypeface(mTypeface);
		mPosition334.setTypeface(mTypeface);

		SharedPreferences recordPref = getSharedPreferences("record", Activity.MODE_PRIVATE);
		if (recordPref != null) {
			mPosition111.setText(recordPref.getInt("recordName11", 0) + "");
			mPosition112.setText(recordPref.getInt("recordName12", 0) + "");
			mPosition113.setText(recordPref.getInt("recordName13", 0) + "");
			mPosition114.setText(recordPref.getInt("recordName1", 0) + "");
			mPosition121.setText(recordPref.getInt("recordName21", 0) + "");
			mPosition122.setText(recordPref.getInt("recordName22", 0) + "");
			mPosition123.setText(recordPref.getInt("recordName23", 0) + "");
			mPosition124.setText(recordPref.getInt("recordName2", 0) + "");
			mPosition131.setText(recordPref.getInt("recordName31", 0) + "");
			mPosition132.setText(recordPref.getInt("recordName32", 0) + "");
			mPosition133.setText(recordPref.getInt("recordName33", 0) + "");
			mPosition134.setText(recordPref.getInt("recordName3", 0) + "");
			mPosition211.setText(recordPref.getInt("recordFlag11", 0) + "");
			mPosition212.setText(recordPref.getInt("recordFlag12", 0) + "");
			mPosition213.setText(recordPref.getInt("recordFlag13", 0) + "");
			mPosition214.setText(recordPref.getInt("recordFlag1", 0) + "");
			mPosition221.setText(recordPref.getInt("recordFlag21", 0) + "");
			mPosition222.setText(recordPref.getInt("recordFlag22", 0) + "");
			mPosition223.setText(recordPref.getInt("recordFlag23", 0) + "");
			mPosition224.setText(recordPref.getInt("recordFlag2", 0) + "");
			mPosition231.setText(recordPref.getInt("recordFlag31", 0) + "");
			mPosition232.setText(recordPref.getInt("recordFlag32", 0) + "");
			mPosition233.setText(recordPref.getInt("recordFlag33", 0) + "");
			mPosition234.setText(recordPref.getInt("recordFlag3", 0) + "");
			mPosition311.setText(recordPref.getInt("recordSurvival11", 0) + "");
			mPosition312.setText(recordPref.getInt("recordSurvival12", 0) + "");
			mPosition313.setText(recordPref.getInt("recordSurvival13", 0) + "");
			mPosition314.setText(recordPref.getInt("recordSurvival1", 0) + "");
			mPosition321.setText(recordPref.getInt("recordSurvival21", 0) + "");
			mPosition322.setText(recordPref.getInt("recordSurvival22", 0) + "");
			mPosition323.setText(recordPref.getInt("recordSurvival23", 0) + "");
			mPosition324.setText(recordPref.getInt("recordSurvival2", 0) + "");
			mPosition331.setText(recordPref.getInt("recordSurvival31", 0) + "");
			mPosition332.setText(recordPref.getInt("recordSurvival32", 0) + "");
			mPosition333.setText(recordPref.getInt("recordSurvival33", 0) + "");
			mPosition334.setText(recordPref.getInt("recordSurvival3", 0) + "");
		}

	}
}